package javaapplication1;

import java.awt.*;
import java.awt.event.*;
import java.util.Random;
import javax.swing.*;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author John
 */
public class JavaApplication1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here  
        TextFrame frame = new TextFrame();
        frame.setTitle("Create Person");
        frame.show();
    }
}

class TextFrame extends JFrame {
    private NewJPanel pcp;

    public TextFrame()  {
        final int DEFAULT_FRAME_WIDTH = 500;
        final int DEFAULT_FRAME_HEIGHT = 500;
        setSize(DEFAULT_FRAME_WIDTH, DEFAULT_FRAME_HEIGHT);
        addWindowListener(new WindowCloser());

        // construct components

        pcp = new NewJPanel();
      
        Container contentPane = getContentPane();
        
        contentPane.add(pcp, "Center");
    }
   
    private class WindowCloser extends WindowAdapter  {  
        public void windowClosing(WindowEvent event)  {
            System.exit(0);
        }
    }
} //TextFrame
